import pandas

path = "D:\工作簿1.xlsx"
def mean(x):
    excel = pandas.read_excel(path)
    return int(sum(excel[x]) / excel[x].shape[0])

age_mean = mean("年龄")
print(f"学生的平均年龄为{age_mean}岁")